Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings #2706

Merged
merged 4 commits into from
Jan 11, 2024
Merged

Fix compiler warnings #2706

merged 4 commits into from
Jan 11, 2024

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Jan 10, 2024

  • Don't fail clock check as Host timers cannot be guaranteed jitter-free
  • Fix failing checks on std::ratio_divide with GCC 13.2.1.
  • Fix various compiler warnings
  • Simplify printf_P for architectures without restricted flash access

Copy link

what-the-diff bot commented Jan 10, 2024

PR Summary

  • Addition of Connect Method in MQTT TCP Client
    The TcpClient::connect method was introduced in MqttClient, which connects to MQTT servers over TCP protocol.
  • Change of Struct to Alias Template in NanoTime
    In NanoTime, the UnitTickRatio struct was swapped out for a corresponding template alias. It's a design change to make code more efficient.
  • Usage of Unused Macro in OneWire
    Certain OneWire methods have been modified to use SMING_UNUSED, ensuring efficient use of resources and better error prevention.
  • Conditional Usage of printf_P Macro
    Depending on the system's architecture, the printf_P macro can now selectively use printf_P_stack. This makes the function more versatile across different platforms.
  • Inclusion of 'unsigned' Conversion Specifier
    The m_printf call was updated to use the 'unsigned' conversion specifier to handle unsigned integers. This improves compatibility with different data types.
  • Removal and Commenting Out Of Variables
    Various variables in lambda functions and AJAX/WebSockets methods have been commented out or eliminated entirely, perhaps suggesting they're no longer necessary in current implementation.
  • Conditions For Checking Elapsed Ticks
    Code block for checking the elapsedTicks value now only runs if the system isn't running on a host architecture. It prevents unnecessary checks and improves performance.
  • Marking Variables as Unused
    In TcpClientTest, the 'connected' variable has been marked as SMING_UNUSED. This clarifies that the variable is intentionally unused, preventing misunderstandings and potential warning messages.

@slaff slaff added this to the 5.2.0 milestone Jan 11, 2024
@slaff slaff merged commit 28c7dcd into SmingHub:develop Jan 11, 2024
45 of 46 checks passed
@mikee47 mikee47 deleted the fix/compiler-warnings branch January 11, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants